"use strict";

angular.module('app.configService').controller('SystemCtrl', function($scope,HTTPDataService,Auths){

 /*if(!Auths.getUser())
    {
         window.location.href=baseurls+"#/login";
    } */

/*$scope.systemInfo={
   
    alarm_switch:"0",
    cycle:"66",
    collection_way:"串口",
    testing_type:"自动",
    communication_mode:"uu", 
    high_t_threshold:"30",
    low_t_threshold:"-10"
 };
 */
 HTTPDataService.getSystemConfig().then(function(response){
       
       $scope.systemInfo = response;
      
       $scope.save = function(){
      
      HTTPDataService.postSysInfo($scope.systemInfo);
      HTTPDataService.setSystemConfig();
      $.smallBox({
                    title: "设置成功",
                    content: "<i class='fa fa-clock-o'></i> <i>设置成功</i>",
                    color: "#659265",
                    iconSmall: "fa fa-check fa-2x fadeInRight animated",
                    timeout: 4000
                });
 
}

    });
   
 
});